<template>
    <div class="profile-container">
        <!-- 个人中心卡片 -->
        <el-card class="profile-card">
            <div slot="header" class="clearfix">
                <i class="el-icon-s-home" style="font-size: 40px"></i><span class="card-title">个人中心</span>
            </div>
            <el-row>
                <el-col :span="24">
                    <el-form :model="manager" label-width="120px">
                        <el-form-item label="用户名">
                            <el-input v-model="manager.name" disabled></el-input>
                        </el-form-item>

                        <el-form-item label="邮箱">
                            <el-input v-model="manager.email" disabled></el-input>
                        </el-form-item>

                        <el-form-item label="性别">
                            <el-input v-model="manager.sex" disabled></el-input>
                        </el-form-item>

                        <el-form-item label="年龄">
                            <el-input v-model="manager.age" disabled></el-input>
                        </el-form-item>

                        <el-form-item label="超级管理员">
                            <el-switch v-model="manager.issuper" disabled></el-switch>
                        </el-form-item>

                        <el-form-item label="账号有效">
                            <el-switch v-model="manager.isvalid" disabled></el-switch>
                        </el-form-item>


                        <el-form-item label="ID">
                            <el-input v-model="manager.id" disabled></el-input>
                        </el-form-item>

                        <!-- 退出按钮 -->
                        <el-form-item>
                            <el-button type="primary" @click="()=>{this.$router.push('/workspace');} ">退出</el-button>
                        </el-form-item>
                    </el-form>
                </el-col>
            </el-row>
        </el-card>
    </div>
</template>

<script>
export default {
    data() {
        return {

            manager: JSON.parse(sessionStorage.getItem("manager")),
        };
    },
};
</script>

<style scoped>
.profile-container {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.profile-card {
    width: 80%;
}

.card-title {
    font-size: 30px;
    font-weight: bold;
}
</style>
